package cz.khfotbal.domain;

import java.util.List;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Transient;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

@Entity
@Table(name = "FOOTBALLMATCH")
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
public class Match {

	@Id
	@GeneratedValue
	private int id;

	private Integer round;
	private String halfHomeGoals;
	private String halfGuestsGoals;
	private String domaciJmeno;
	private String hosteJmeno;

	private String start = "";
	private String datum = "";
	private String matchCode = "";
	private String mainReferee = "";
	private String lineReferee = "";
	private String lineRefereeTwo = "";
	private String spolujizda = "";
	private String delegat = "";
	private String pocetHracu = "";
	@Column(length = 1000)
	private String domaciZaklSestava = "";
	private String hosteZaklSestava = "";
	private String domaciStrelci = "";
	private String hosteStrelci = "";
	private String domaciStridani = "";
	private String hosteStridani = "";
	private String domaciZluteKarty = "";
	private String domaciCerveneKarty = "";
	private String hosteZluteKarty = "";
	private String hosteCerveneKarty = "";
	private String domaciKomentar = "";
	private String hosteKomentar = "";
	private String poznamka = "";
	@Transient
	private Integer weekDay;
	@Transient
	private String matchStart;

	private boolean datumChange;
	private boolean startChange;
	private boolean mainRefereeChange;
	private boolean lineRefereeChange;
	private boolean lineRefereeTwoChange;
	private boolean spolujizdaChange;
	private boolean delegatChange;
	private boolean zvyraznit;

	// @OneToMany(mappedBy = "match", cascade = CascadeType.ALL, fetch =
	// FetchType.EAGER)
	// private Set<Event> events;

	// @OneToMany(mappedBy = "match", cascade = CascadeType.ALL, fetch =
	// FetchType.EAGER)
	// private Set<MatchDelegat> matchDelegats;
	//
	// @OneToMany(mappedBy = "match", cascade = CascadeType.ALL, fetch =
	// FetchType.EAGER)
	// private Set<MatchReferee> matchReferees;

	@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
	@OneToMany(mappedBy = "match", cascade = CascadeType.ALL, fetch = FetchType.EAGER)
	private Set<SeasonCompetionTeamMatch> seasonCompetionTeamMatches;

	@Transient
	private Team homeTeam;
	@Transient
	private Team awayTeam;
	@Transient
	private String homeTeamScore;
	@Transient
	private String awayTeamScore;
	@Transient
	private List<MatchDelegat> matchDelegatsList;
	@Transient
	private List<MatchReferee> matchRefereesList;
	@Transient
	private Competion competion;

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	// public Set<Event> getEvents() {
	// return events;
	// }
	//
	// public void setEvents(Set<Event> events) {
	// this.events = events;
	// }

	public Set<SeasonCompetionTeamMatch> getSeasonCompetionTeamMatches() {
		return seasonCompetionTeamMatches;
	}

	public void setSeasonCompetionTeamMatches(
			Set<SeasonCompetionTeamMatch> seasonCompetionTeamMatches) {
		this.seasonCompetionTeamMatches = seasonCompetionTeamMatches;
	}

	public Team getHomeTeam() {
		return homeTeam;
	}

	public void setHomeTeam(Team homeTeam) {
		this.homeTeam = homeTeam;
	}

	public Team getAwayTeam() {
		return awayTeam;
	}

	public void setAwayTeam(Team awayTeam) {
		this.awayTeam = awayTeam;
	}

	public void setRound(int round) {
		this.round = round;
	}

	public String getStart() {
		return start;
	}

	public void setStart(String start) {
		this.start = start;
	}

	public Integer getRound() {
		return round;
	}

	public void setRound(Integer round) {
		this.round = round;
	}

	// public Set<MatchDelegat> getMatchDelegats() {
	// return matchDelegats;
	// }
	//
	// public void setMatchDelegats(Set<MatchDelegat> matchDelegats) {
	// this.matchDelegats = matchDelegats;
	// }
	//
	// public Set<MatchReferee> getMatchReferees() {
	// return matchReferees;
	// }
	//
	// public void setMatchReferees(Set<MatchReferee> matchReferees) {
	// this.matchReferees = matchReferees;
	// }

	public List<MatchDelegat> getMatchDelegatsList() {
		return matchDelegatsList;
	}

	public void setMatchDelegatsList(List<MatchDelegat> matchDelegatsList) {
		this.matchDelegatsList = matchDelegatsList;
	}

	public List<MatchReferee> getMatchRefereesList() {
		return matchRefereesList;
	}

	public void setMatchRefereesList(List<MatchReferee> matchRefereesList) {
		this.matchRefereesList = matchRefereesList;
	}

	public String getMainReferee() {
		return mainReferee;
	}

	public void setMainReferee(String mainReferee) {
		this.mainReferee = mainReferee;
	}

	public String getLineReferee() {
		return lineReferee;
	}

	public void setLineReferee(String lineReferee) {
		this.lineReferee = lineReferee;
	}

	public String getSpolujizda() {
		return spolujizda;
	}

	public void setSpolujizda(String spolujizda) {
		this.spolujizda = spolujizda;
	}

	public String getDelegat() {
		return delegat;
	}

	public void setDelegat(String delegat) {
		this.delegat = delegat;
	}

	public String getDomaciZaklSestava() {
		return domaciZaklSestava;
	}

	public void setDomaciZaklSestava(String domaciZaklSestava) {
		this.domaciZaklSestava = domaciZaklSestava;
	}

	public String getHosteZaklSestava() {
		return hosteZaklSestava;
	}

	public void setHosteZaklSestava(String hosteZaklSestava) {
		this.hosteZaklSestava = hosteZaklSestava;
	}

	public String getDomaciStridani() {
		return domaciStridani;
	}

	public void setDomaciStridani(String domaciStridani) {
		this.domaciStridani = domaciStridani;
	}

	public String getHosteStridani() {
		return hosteStridani;
	}

	public void setHosteStridani(String hosteStridani) {
		this.hosteStridani = hosteStridani;
	}

	public String getDomaciZluteKarty() {
		return domaciZluteKarty;
	}

	public void setDomaciZluteKarty(String domaciZluteKarty) {
		this.domaciZluteKarty = domaciZluteKarty;
	}

	public String getDomaciCerveneKarty() {
		return domaciCerveneKarty;
	}

	public void setDomaciCerveneKarty(String domaciCerveneKarty) {
		this.domaciCerveneKarty = domaciCerveneKarty;
	}

	public String getHosteZluteKarty() {
		return hosteZluteKarty;
	}

	public void setHosteZluteKarty(String hosteZluteKarty) {
		this.hosteZluteKarty = hosteZluteKarty;
	}

	public String getHosteCerveneKarty() {
		return hosteCerveneKarty;
	}

	public void setHosteCerveneKarty(String hosteCerveneKarty) {
		this.hosteCerveneKarty = hosteCerveneKarty;
	}

	public String getDomaciStrelci() {
		return domaciStrelci;
	}

	public void setDomaciStrelci(String domaciStrelci) {
		this.domaciStrelci = domaciStrelci;
	}

	public String getHosteStrelci() {
		return hosteStrelci;
	}

	public void setHosteStrelci(String hosteStrelci) {
		this.hosteStrelci = hosteStrelci;
	}

	public String getHomeTeamScore() {
		return homeTeamScore;
	}

	public void setHomeTeamScore(String homeTeamScore) {
		this.homeTeamScore = homeTeamScore;
	}

	public String getAwayTeamScore() {
		return awayTeamScore;
	}

	public void setAwayTeamScore(String awayTeamScore) {
		this.awayTeamScore = awayTeamScore;
	}

	public String getDatum() {
		return datum;
	}

	public void setDatum(String datum) {
		this.datum = datum;
	}

	public void setMatchCode(String matchCode) {
		this.matchCode = matchCode;
	}

	public String getMatchCode() {
		return matchCode;
	}

	public String getPocetHracu() {
		return pocetHracu;
	}

	public void setPocetHracu(String pocetHracu) {
		this.pocetHracu = pocetHracu;
	}

	public String getLineRefereeTwo() {
		return lineRefereeTwo;
	}

	public void setLineRefereeTwo(String lineRefereeTwo) {
		this.lineRefereeTwo = lineRefereeTwo;
	}

	public boolean isDatumChange() {
		return datumChange;
	}

	public void setDatumChange(boolean datumChange) {
		this.datumChange = datumChange;
	}

	public boolean isStartChange() {
		return startChange;
	}

	public void setStartChange(boolean startCahnge) {
		this.startChange = startCahnge;
	}

	public boolean isMainRefereeChange() {
		return mainRefereeChange;
	}

	public void setMainRefereeChange(boolean mainRefereeChange) {
		this.mainRefereeChange = mainRefereeChange;
	}

	public boolean isLineRefereeChange() {
		return lineRefereeChange;
	}

	public void setLineRefereeChange(boolean lineRefereeChange) {
		this.lineRefereeChange = lineRefereeChange;
	}

	public boolean isLineRefereeTwoChange() {
		return lineRefereeTwoChange;
	}

	public void setLineRefereeTwoChange(boolean lineRefereeTwoChange) {
		this.lineRefereeTwoChange = lineRefereeTwoChange;
	}

	public boolean isSpolujizdaChange() {
		return spolujizdaChange;
	}

	public void setSpolujizdaChange(boolean spolujizdaChange) {
		this.spolujizdaChange = spolujizdaChange;
	}

	public boolean isDelegatChange() {
		return delegatChange;
	}

	public void setDelegatChange(boolean delegatChange) {
		this.delegatChange = delegatChange;
	}

	public boolean isZvyraznit() {
		return zvyraznit;
	}

	public void setZvyraznit(boolean zvyraznit) {
		this.zvyraznit = zvyraznit;
	}

	public Integer getWeekDay() {
		return weekDay;
	}

	public void setWeekDay(Integer weekDay) {
		this.weekDay = weekDay;
	}

	public String getMatchStart() {
		return matchStart;
	}

	public void setMatchStart(String matchStart) {
		this.matchStart = matchStart;
	}

	public Competion getCompetion() {
		return competion;
	}

	public void setCompetion(Competion competion) {
		this.competion = competion;
	}

	public String getDomaciKomentar() {
		return domaciKomentar;
	}

	public void setDomaciKomentar(String domaciKomentar) {
		this.domaciKomentar = domaciKomentar;
	}

	public String getHosteKomentar() {
		return hosteKomentar;
	}

	public void setHosteKomentar(String hosteKomentar) {
		this.hosteKomentar = hosteKomentar;
	}

	public String getHalfHomeGoals() {
		return halfHomeGoals;
	}

	public void setHalfHomeGoals(String halfHomeGoals) {
		this.halfHomeGoals = halfHomeGoals;
	}

	public String getHalfGuestsGoals() {
		return halfGuestsGoals;
	}

	public void setHalfGuestsGoals(String halfGuestsGoals) {
		this.halfGuestsGoals = halfGuestsGoals;
	}

	public String getPoznamka() {
		return poznamka;
	}

	public void setPoznamka(String poznamka) {
		this.poznamka = poznamka;
	}

	public String getDomaciJmeno() {
		return domaciJmeno;
	}

	public void setDomaciJmeno(String domaciJmeno) {
		this.domaciJmeno = domaciJmeno;
	}

	public String getHosteJmeno() {
		return hosteJmeno;
	}

	public void setHosteJmeno(String hosteJmeno) {
		this.hosteJmeno = hosteJmeno;
	}

}
